import request from '@/utils/request'
import {HOST} from '@/constants'
import qs from 'qs'

export function getEnterpriseList(data) {
    return request({
        url: `${HOST}/enterprise/list`,
        method: 'get',
        params: data
    })
}

export function getEnterpriseToAuth(data) {
    return request({
        url: `${HOST}/enterprise/to-auth`,
        method: 'get',
        params: data
    })
}

export function getOneEnterprise(data) {
    return request({
        url: `${HOST}/enterprise/one`,
        method: 'get',
        params: data
    })
}

export function getMyEnterprise(data) {
    return request({
        url: `${HOST}/enterprise/my`,
        method: 'get',
        params: data
    })
}

export function authEnterprise(data) {
    return request({
        url: `${HOST}/enterprise/auth`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function submitEnterprise(data) {
    return request({
        url: `${HOST}/enterprise/submit`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function accessEnterprise(data) {
    return request({
        url: `${HOST}/enterprise/access`,
        method: 'post',
        data: qs.stringify(data)
    })
}
